import request from "@/utils/request";
// 正选列表
export function selectionlist(query) {
  return request({
    url: "/manager/selection/list",
    method: "get",
    params: query,
  });
}

// 临时选课-选课结果
export function listPost_temporary(query) {
  return request({
    url: "/manager/selection/resultList",
    method: "get",
    params: query,
  });
}

// 临时选课-新增
export function addPost_temporary(data) {
  return request({
    url: "/manager/selection/temporary",
    method: "post",
    data: data,
  });
}

// 选课-选课结果
export function listPost_selection(query) {
  return request({
    url: "/manager/selection/temporary/resultList",
    method: "get",
    params: query,
  });
}
//  选课-删除
export function delPost_selection(postId) {
  return request({
    url: '/manager/selection/' + postId,
    method: 'delete'
  })
}
// 选课-新增
export function addPost_selection(data) {
  return request({
    url: "/manager/selection",
    method: "post",
    data: data,
  });
}
// 选课-修改
export function updatePost_selection(data) {
  return request({
    url: "/manager/selection",
    method: "put",
    data: data,
  });
}
// 取消正选
export function updatePost_cancelSelection(data) {
  return request({
    url: "/manager/selection/cancelSelection",
    method: "put",
    data: data,
  });
}
// 临时选课-获取最新详细信息
export function temporarylastOne() {
  return request({
    url: "/manager/selection/temporary/lastOne",
    method: "get",
  });
}
// 选课-获取最新详细信息
export function selectionlastOne() {
  return request({
    url: "/manager/selection/lastOne",
    method: "get",
  });
}
